﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Epona.Domain.Query.Impl
{
    public class PropertyCompareCriterion:BasicCriterion
    {
        public string OtherPropName { get; private set; }
        public string Operator { private get; set; }

        public PropertyCompareCriterion(string propName,string otherPropName)
            :base(propName)
        {
            this.OtherPropName = otherPropName;
        }

        public override string ToQueryString()
        {
            return GetPropNameWithAlias() + Operator + ROOT_ALIAS + "." + OtherPropName;
        }

        public override NamedParameters GetParameters()
        {
            return NamedParameters.Create();
        }
    }
}
